#ifndef __AS_SCREEN_STACK__H__
#define __AS_SCREEN_STACK__H__

/*
 *	including head files
 */
#include "..\screen\ASScreen.h"
/*
 *	definition
 */
#define AS_MAX_SCREEN_COUNTS                8


typedef struct
{
    /*attributes*/
    ASINT is_inited;
    ASINT cur_idx;
    as_screen* screens[AS_MAX_SCREEN_COUNTS];


    /*methods*/

    /*
    *	[description] create a new screen and push into the stack
    */
    as_ret (*new_and_push_screen)(as_screen_type type);

    /*
     *	[description] delete a screen from stack and destroy itself
     */
    as_ret (*delete_and_pop_screen)(void);

    /*
     *  [description] get current screen
     *  [return] as_screen : pointer of current screen
     */
    as_screen* (*get_cur_screen)(void);

    /*
     *	[description] clear up the screen stack
     *  [return] as_ret
     */
    as_ret (*clear_all)(void);
    /*
     *	[description] if screen stack empty
     *  [return] ASINT : 0 means empty
     *                   1 means not empty
     */
    ASINT (*if_empty)(void);

    /*
     *	[description] if screen stack full
     *  [return] ASINT : 0 means full
     *                   1 means not full
     */
    ASINT (*if_full)(void);

    /*
     *	[description] get max screen counts
     *  [return] ASINT : return max screen counts the manager could contain.
     */
    ASINT (*get_max_counts)(void);

    /*
     *	[description] get current screen counts
     *  [return] ASINT : current valid screen counts
     */
    ASINT (*get_cur_counts)(void);

} as_screen_manager;


/*
 *	[description] get the instance of screen stack,return the global instance
 *  [param] null
 *  [return] return the pointer of global screen manager instance
 */
as_screen_manager* as_get_screen_stack_instance(void);

/*
 *	[description] repaint the given screen
 *  [param] screen_p : pointer of given screen
 *  [return] null
 */
void as_screen_repaint(as_screen* screen_p);













#endif//__AS_SCREEN_STACK__H__